<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="style/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="style/js/fun.js"></script><title></title></head><body>
<span class="subTitle">去除字符串中的特殊符号</span>
<?php
	$str1 = "<span style=\"color:#F00;font-weight:bold;\">红色加粗字体.</span>";
	$str2 = "<h1 style=\"font-size:12px;\">h1字体, 字号12px.</h1>";
	
	echo "处理之前的\$str1 : ".$str1."<br />\n";
	echo "处理之前的\$str2 : ".$str2."<br />\n";
	
	$str1 = strip_tags($str1);
	$str2 = strip_tags($str2);
	
	echo "处理以后 : ".$str1."<br />\n";
	echo "处理以后 : ".$str2."<br />(貌似把h1也干掉了.)\n";
?>
<span class="subTitle">将HTML代码原样输出(即将html代码特殊符号转义)</span>
<?php
	$str = "<div class=\"baba\">原样输出</div>";
	$str = htmlspecialchars($str);
	
	echo "就这么华丽的输出原样代码 : ".$str."<br />\n";                                      
	
?>
<span class="subTitle">字符串比较</span>
<?php
	$str1 = "abc_string1";
	$str2 = "def_string2";
	
	echo "参与比较的两个字符串分别为 :<br />\n\$str1 : ".$str1."<br />\n\$str2 : ".$str2."<br /><br />\n";
	
	$temp = strcmp($str1,$str2);
	if($temp > 0){
		echo "正如你所猜到或者猜不到. \$str1 > \$str2";
	}else{
		echo "你能看到这句话..说明\$str2 <= \$str1";
	}
?></body>
</html>